# 导包
import requests

# 设置url,header体,body体,发送http请求,获取响应结果

url = "http://ihrm-test.itheima.net/api/sys/login"
header = {"Content-Type": "application/json"}
body = {"mobile": "13800000002", "password": "123456"}
resp = requests.post(url=url, headers=header, json=body)

# 打印状态码和响应结果
print("响应状态码=", resp.status_code)
print("响应结果=", resp.json())
